import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Search from '../views/Search'
import Upload from '../views/Upload'
import Mdetails from '../views/Mdetails'
import Person from '../views/Person.vue'
import Personinfo from '../views/Personinfo.vue'
import Setting from '../views/Setting.vue'
import Login from '../views/Login.vue'

import Collect from '../views/Collect'
import UploadWorks from '../views/UploadWorks.vue'
import Works from '../views/Works.vue'



Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'Home',
        component: Home
    },
    {
        path: '/search',
        name: 'Search',
        component: Search
    },
    {
        path: '/upload',
        name: 'Upload',
        component: Upload
    },
    {
        path: '/mdetails',
        name: 'Mdetails',
        component: Mdetails
    },

    {
        path: '/person',
        component: Person
    },
    {
        path: '/personinfo',
        component: Personinfo
    },
    {
        path: '/setting',
        component: Setting
    },
    {
        path: '/login',
        component: Login
    },
    {
        path: '/uploadworks',
        name: 'UploadWorks',
        component: () =>
            import ( /* webpackChunkName: "uploadworks" */ '../views/UploadWorks.vue')
    },
    {
        path: '/works',
        name: 'Works',
        component: () =>
            import ( /* webpackChunkName: "works" */ '../views/Works.vue')
    },
       {
        path: '/collect',
        name: 'Collect',
        component: () => import(/* webpackChunkName: "collect" */ '../views/Collect.vue')
    },
    // {
    //   path: '/about',
    //   name: 'About',
    //   // route level code-splitting
    //   // this generates a separate chunk (about.[hash].js) for this route
    //   // which is lazy-loaded when the route is visited.
    //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
    // }
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router